import { Vector3 } from 'three-legacy';

export enum State {
  NONE,
  DRAW,
  FINISH,
}

export type MouseState = State.NONE | State.DRAW | State.FINISH;

export interface TrackingData {
  vertexs: Vector3[];
}

export interface ExtrudeDialogProps {
  title?: string;
  onClose: () => void;
  rectangleType?: RectangleRelation;
}

export enum RectangleRelation {
  // 对角线矩形
  DIAGONAL = 1,
  // 平行四边形
  PARALLEL = 2,
  // 中心矩形
  CENTER = 3,
  // 3点拐角矩形
  THREE_POINT = 4,
  //
  THREE_POINT_CENTER = 5,
}

export const rectangle = {
  [RectangleRelation.DIAGONAL]: 'diagonal',
  [RectangleRelation.PARALLEL]: 'parallelogram',
  [RectangleRelation.CENTER]: 'center',
  [RectangleRelation.THREE_POINT]: 'oblique',
  [RectangleRelation.THREE_POINT_CENTER]: 'three-center',
};

// 矩形
export interface Rectangle {
  rectangleRelation: RectangleRelation;
}
